package com.zpark.service.impl;

import com.zpark.entity.User;
import com.zpark.mapper.IUserMapper;
import com.zpark.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @PackageName: com.zpark.service.impl
 * @ClassName: UserServiceImpl
 * @Description:
 * @author: RZS
 * @date: 2024/3/4  11:44
 */
@Service
public class UserServiceImpl implements IUserService {

    @Autowired  // 自动注入bean
    private IUserMapper userMapper;

    @Override
    public User findByUsername(String name) {
        // 调用持久层获取数据，然后校验数据
        return userMapper.selectByUsername(name);
    }
}
